<template>
  <div>
    <el-collapse value="common">
      <el-collapse-item title="公共配置" name="common">
        <el-form :model="widget.UI.data" label-width="80px" size="mini" class="pad-lft-rgt-10">
          <el-row :gutter="10">
            <el-col :span="24">
              <el-form-item label="输入类型">
                <el-select v-model="widget.UI.data.obscureText" placeholder="请选择输入类型" class="width-100">
                  <el-option label="字符" :value=false></el-option>
                  <el-option label="密码" :value=true></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="占位符">
                <el-input v-model="widget.UI.data.placeholder" placeholder="请填写占位符"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="键盘类型">
                <el-select v-model="widget.UI.data.systemKeyboard" placeholder="选择键盘类型" size="mini" class="width-100">
                  <el-option label="系统键盘" :value="true"></el-option>
                  <el-option label="自定义键盘" :value="false"></el-option>
                </el-select>
              </el-form-item>
            </el-col>

          </el-row>
        </el-form>
      </el-collapse-item>
    </el-collapse>
  </div>
</template>

<script>
  import {WidgetInput} from "@/modules/IDE/widget/atom/widgetInput";

  export default {
    name: 'InputSpec',
    props: {
      widget: {
        type: WidgetInput,
        default: () => {
          return {};
        }
      }
    },
    computed: {
      state() {
        return this.widget.getCurrentState();
      }
    }
  };
</script>

<style scoped>
</style>
